package com.tzy.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.mai.entity.Product;
import com.tzy.entity.ProductInfo;
import com.tzy.service.ProductInfoService;


/**
* <p>Title: ClientController</p> 
* <p>Description: 顾客主页面对菜单进行查询</p> 
* @author  唐振耀 
* @date  2019年5月22日
*/
@Controller
public class HomepageController {
	@Autowired
	private ProductInfoService pi;
	/**
	 * 根据菜名查询 商品表的相关信息
	 * 一对多
	 * @param model
	 * @return
	 */
	@RequestMapping("selectAllCai")
	public String selectAllCai(Integer user_id,String category_name,Model model) {
		List<Product> cai = pi.findAllCai(category_name);
		model.addAttribute("lsss", cai);
		return "menu";
	}
	
	
}
